package com.trkj.dao.jpa;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojos.Card;
import com.trkj.vo.CardVo;

public interface ICardDao extends CrudRepository<Card, String> {
	/**
	 * JPQL 模糊查询 ByNmae
	 * @param name
	 * @return
	 */
	@Query("select new com.trkj.vo.CardVo(C.cradId,C.address,C.age,C.idCard,C.name,C.sex,C.status,C.time) "
			+ " from Card C where C.name like ?1")
	public List<CardVo> queryByNameLike(String name);
	@Query("select new com.trkj.vo.CardVo(C.cradId,C.address,C.age,C.idCard,C.name,C.sex,C.status,C.time) "
			+ " from Card C where C.cradId like ?1")
	public List<CardVo> queryByIDLike(String ID);
	
}
